import axios from 'axios';

// 列表
function getList(params) {
  return axios({
    url: `/user/list`,
    method: 'get',
    params,
  });
}

// 详情
function getInfo(params) {
  return axios({
    url: `/user/detail`,
    method: 'get',
    params,
  });
}

// 创建
function create(params) {
  return axios({
    url: `/user/create`,
    method: 'post',
    data: params,
  });
}

// 更新
function update(params) {
  return axios({
    url: `/user/update`,
    method: 'post',
    data: params,
  });
}

// 删除
function del(params) {
  return axios({
    url: `/user/delete`,
    method: 'post',
    data: params,
  });
}

export default {
  getList,
  getInfo,
  create,
  update,
  del,
}
